#include "RenzoSceneIOPlugin.h"
#include "RenzoPrecompiled.h"
#include "RenzoSceneManager.h"
#include "RenzoSceneCollada.h"


namespace Renzo
{
SceneIOPlugin::SceneIOPlugin(void)
{
}

SceneIOPlugin::~SceneIOPlugin(void)
{
}

const char* SceneIOPlugin::getName() const {
	return PLUGIN_RENZO_SCENEIO;
}

void SceneIOPlugin::install() {
	SceneManager* sm = Renzoderer::instance()->getSceneManager();
	sceneCollada = new SceneCollada;	
	sm->registerFormat(sceneCollada);
	String fmt = sceneCollada->getFormatExtension();
	Log::instance()->write("Loader %s registered successfully.", fmt);
	Log::instance()->write("Plugin %s installed successfully.", this->getName());
}

void SceneIOPlugin::uninstall() {
	SceneManager* sm = Renzoderer::instance()->getSceneManager();
	sm->unregisterFormat(sceneCollada);
	rzDel(sceneCollada);
}

void SceneIOPlugin::begin() {
}

void SceneIOPlugin::end() {
}

}